<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script type="text/javascript" src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/vue/2.6.14/vue.min.js"></script><script type="text/javascript" src="https://unpkg.com/vue-lazyload@1.2.3/vue-lazyload.js"></script>
    
    <title>vue图片懒加载</title>
    <style>
      .img_box {
        height: 300px;
      }
      .img_box img {
        max-height: 100%;
      }
    </style>
    <link rel="stylesheet" href="../../../../static/css/047-style-9099aebd.css">
  </head>
  <body>
    <div id="app">
      <ul v-lazy-container="{ selector: 'img' }">
        <li v-for="e in 100" :key="e" class="img_box">
          <img class="lazyload" :data-src="`http://www.ruanyifeng.com/images_pub/pub_${e}.jpg`" />
        </li>
      </ul>
    </div>
    <script>
      Vue.use(VueLazyload)
      new Vue({ el: '#app' })
    </script>
  </body>
</html>
